<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			//日期时间对象
			var d1 = new Date(); //当前时间

			
			document.write(d1.getFullYear() + "-");
			document.write((d1.getMonth() + 1) + "-");
			document.write(d1.getDate() + "&nbsp");
			document.write(d1.getHours() + ":");
			document.write(d1.getMinutes() + ":");
			document.write(d1.getSeconds() + ".");
			document.write(d1.getMilliseconds());
			document.write("<br />")
			
			var d2 = new Date(2025, 0, 1);
			// d1.setHours(9);
			// d1.setMinutes(15);
			// d1.setSeconds(30);
			
			var span = d2.getTime() - d1.getTime();
			document.write((span/1000/60/60/24) + "天")
		</script>
	</body>
</html>
